package middle

import (
	"fmt"
	"github.com/gin-gonic/gin"
	"time"
)

func RunTime() gin.HandlerFunc {
	return func(c *gin.Context) {
		start := time.Now().UnixMilli()

		c.Next()
		and := time.Now().UnixMilli()
		fmt.Println("代码运行时间是", and-start)
	}
}
